<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-wi dth, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let name ="cgj";
        const age=20
        // age=age +1    不能对原来的内容进行修改
        let info= ` my name is ${name}, my age is ${age+1}`
        console.log(info)
        function fun1(){
            return "fun1 invoke";
        }
        let str=fun1()
        console.log(str)
        console.log(`用模版字符串拼接更方便:${fun1()}`)


        function fun2(a,b){
            return a+b;
        }
        console.log(fun2(1,2));
   
        // 箭头函数
        let reuslt=(a,b)=>{return a+b}
        console.log(reuslt(1,2))
        // 可以继续简化
      let  reuslt2 = (a,b)=> a+b 
        console.log(reuslt2(1,2))
    </script>
    
</body>
</html>